﻿using SIG.Resources.Admin;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIG.InputModel.Admin
{
    public class PageSiteSetIM
    {
        public ArticleSetIM ArticleSet { get; set; }
        public PostSetIM PostSet { get; set; }
        public SiteInfoIM SiteInfo { get; set; }
        public CaseSetIM CaseSet { get; set; }
    }

    public class CaseSetIM
    {
        [Display(ResourceType = typeof(Labels), Name = "PageSize")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public int FrontPageSize { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "ThumbHeight")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public int ThumbHeight { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "ThumbWidth")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public int ThumbWidth { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "EnableCaching")]
        public bool EnableCaching { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "CacheDuration")]
        public int CacheDuration { get; set; }


    }
    public class PostSetIM
    {
        [Display(ResourceType = typeof(Labels), Name = "PageSize")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public int FrontPageSize { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "ThumbHeight")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public int ThumbHeight { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "ThumbWidth")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public int ThumbWidth { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "EnableCaching")]
        public bool EnableCaching { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "CacheDuration")]
        public int CacheDuration { get; set; }
    }
    public class ArticleSetIM
    {
        [Display(ResourceType = typeof(Labels), Name = "PageSize")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public int FrontPageSize { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "ThumbHeight")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public int ThumbHeight { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "ThumbWidth")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public int ThumbWidth { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "EnableCaching")]
        public bool EnableCaching { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "CacheDuration")]
        public int CacheDuration { get; set; }
    }
    public class SiteInfoIM
    {
        [Display(ResourceType = typeof(Labels), Name = "SiteName")]
        public string SiteName { get; set; }

        [Url(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "InvalidFormat")]
        [Display(ResourceType = typeof(Labels), Name = "SiteDomainName")]
        public string SiteDomainName { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "WebNumber")]
        public string WebNumber { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "BaiduSiteID")]
        //[DataType(DataType.ImageUrl)]   4.5才有效  
        public string BaiduSiteID { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "IsClose")]
        public bool IsClose { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "CloseInfo")]
        public string CloseInfo { get; set; }
    }
}
